package top.lshaci.learning.framework.web.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.lshaci.framework.common.model.JsonResponse;
import top.lshaci.learning.framework.model.dto.TestDTO;

import javax.validation.Valid;

/**
 * TestController
 *
 * @author lshaci
 * @since 1.0.0
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @PostMapping("/add")
    public JsonResponse<Object> add(@Valid @RequestBody TestDTO dto) {
        System.err.println(dto);
        return JsonResponse.successMessage("添加成功");
    }
}
